Optimal. Leaf size=57 \[ A x-\frac {B (b c-a d) n \log (c+d x)}{b d}+\frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2536, 31}
\begin {gather*} \frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b}-\frac {B n (b c-a d) \log (c+d x)}{b d}+A x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2536
Rubi steps
\begin {align*} \int \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx &=A x+B \int \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx\\ &=A x+\frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b}-\frac {(B (b c-a d) n) \int \frac {1}{c+d x} \, dx}{b}\\ &=A x-\frac {B (b c-a d) n \log (c+d x)}{b d}+\frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 57, normalized size = 1.00 \begin {gather*} A x-\frac {B (b c-a d) n \log (c+d x)}{b d}+\frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(122\) vs.
\(2(57)=114\).
time = 0.18, size = 123, normalized size = 2.16
method | result | size |
default | \(A x +B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) x -\frac {B n c \ln \left (d x +c \right ) a}{a d -c b}+\frac {B n \,c^{2} \ln \left (d x +c \right ) b}{\left (a d -c b \right ) d}+\frac {B n \,a^{2} \ln \left (b x +a \right ) d}{\left (a d -c b \right ) b}-\frac {B n a \ln \left (b x +a \right ) c}{a d -c b}\) | \(123\) |
risch | \(A x -B x \ln \left (\left (d x +c \right )^{n}\right )-\frac {i B \pi x \mathrm {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{3}}{2}+\frac {i B \pi x \,\mathrm {csgn}\left (i \left (b x +a \right )^{n}\right ) \mathrm {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}}{2}+\frac {i B \pi x \,\mathrm {csgn}\left (i \left (d x +c \right )^{-n}\right ) \mathrm {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}}{2}+\frac {i B \pi x \,\mathrm {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \mathrm {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{2}}{2}-\frac {i B \pi x \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \mathrm {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )}{2}-\frac {i B \pi x \,\mathrm {csgn}\left (i \left (b x +a \right )^{n}\right ) \mathrm {csgn}\left (i \left (d x +c \right )^{-n}\right ) \mathrm {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )}{2}-\frac {i B \pi x \mathrm {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{3}}{2}+\frac {i B \pi x \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{2}}{2}+B \ln \left (e \right ) x +B x \ln \left (\left (b x +a \right )^{n}\right )+\frac {B a n \ln \left (-b x -a \right )}{b}-\frac {B c n \ln \left (d x +c \right )}{d}\) | \(385\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 61, normalized size = 1.07 \begin {gather*} {\left (\frac {a n e \log \left (b x + a\right )}{b} - \frac {c n e \log \left (d x + c\right )}{d}\right )} B e^{\left (-1\right )} + B x \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 54, normalized size = 0.95 \begin {gather*} \frac {{\left (A + B\right )} b d x + {\left (B b d n x + B a d n\right )} \log \left (b x + a\right ) - {\left (B b d n x + B b c n\right )} \log \left (d x + c\right )}{b d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.03, size = 55, normalized size = 0.96 \begin {gather*} {\left (n x \log \left (b x + a\right ) - n x \log \left (d x + c\right ) + \frac {a n \log \left (b x + a\right )}{b} - \frac {c n \log \left (-d x - c\right )}{d} + x\right )} B + A x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.11, size = 53, normalized size = 0.93 \begin {gather*} A\,x+B\,x\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )+\frac {B\,a\,n\,\ln \left (a+b\,x\right )}{b}-\frac {B\,c\,n\,\ln \left (c+d\,x\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________